<h2>memory_object_data_return</h2>
<hr>
<p>
<strong>Server Interface</strong> - Return memory object data to the appropriate memory manager.
<h3>SYNOPSIS</h3>
<pre>
<strong>kern_return_t   memory_object_data_return</strong>
                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
                 <strong>memory_object_control_t</strong>         <var>memory_control</var>,
                 <strong>vm_offset_t</strong>                             <var>offset</var>,
                 <strong>pointer_t</strong>                                 <var>data</var>,
                 <strong>boolean_t</strong>                                <var>dirty</var>,
                 <strong>boolean_t</strong>                          <var>kernel_copy</var><strong>);</strong>


<strong>kern_return_t   seqnos_memory_object_data_return</strong>
                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
                 <strong>mach_port_seqno_t</strong>                        <var>seqno</var>,
                 <strong>memory_object_control_t</strong>         <var>memory_control</var>,
                 <strong>vm_offset_t</strong>                             <var>offset</var>,
                 <strong>pointer_t</strong>                                 <var>data</var>,
                 <strong>boolean_t</strong>                                <var>dirty</var>,
                 <strong>boolean_t</strong>                          <var>kernel_copy</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>memory_object</var> 
<dd>
[in abstract-memory-object (receive) right]
The abstract memory
object port that represents the memory object data.
<p>
<dt> <var>seqno</var> 
<dd>
[in scalar]
The sequence number of this message relative to the abstract 
memory object port.
<p>
<dt> <var>memory_control</var> 
<dd>
[in memory-cache-control send right]
The memory cache control port 
to be used for a response by the memory manager.  If the memory
object has been supplied to more than one kernel, this parameter
identifies the kernel that is making the call.
<p>
<dt> <var>offset</var> 
<dd>
[in scalar]
The offset within the memory object.
<p>
<dt> <var>data</var> 
<dd>
[in pointer to dynamic array of bytes]
The data that has been evicted 
from the physical memory cache.
<p>
<dt> <var>dirty</var> 
<dd>
[in scalar]
If <strong>TRUE</strong>, the pages returned have been modified.
<p>
<dt> <var>kernel_copy</var> 
<dd>
[in scalar]
If <strong>TRUE</strong>, the kernel has kept a copy of the page.
</dl>
<h3>DESCRIPTION</h3>
<p>
A <strong>memory_object_data_return</strong> function is called as the
result of a kernel
message providing the memory manager with data that has been evicted from the 
physical memory cache.
<p>
The kernel writes back only data that has been modified or is precious.  When 
the memory manager no longer needs the data (for example, after the data has 
been written to permanent storage), it should use <strong>vm_deallocate</strong>
to release the 
memory resources.
<h3>NOTES</h3>
<p>
The kernel can flush clean (that is, un-modified) non-precious
pages at its own 
discretion.  As a result, the memory manager cannot rely on the
kernel to keep a 
copy of its data or even to provide notification that its data
has been discarded.
<p>
The kernel may re-request the returned data at any time following this message 
(including immediately).
<h3>RETURN VALUES</h3>
<p>
Only generic errors apply.
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="memory_object_data_supply.html"><strong>memory_object_data_supply</strong></a>,
<a href="vm_deallocate.html"><strong>vm_deallocate</strong></a>,
<a href="memory_object_synchronize.html"><strong>memory_object_synchronize</strong></a>,
<a href="memory_object_server.html"><strong>memory_object_server</strong></a>,
<a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>.
